<FORM method="post" action="/backend/subscribers/save/">
<div class="form">
    <H1>{if $Subscriber->isNew()}Добавление подписчика{else}Редактирование подписчика '{$Subscriber->full_name}'{/if}</H1>
    <div class="operation"><a href="{$fvConfig->get('dir_web_root')}subscribers/" onclick="go('{$fvConfig->get('dir_web_root')}subscribers/'); return false;" class="left">вернутся к списку</a><div style="clear: both;"></div></div>
<div style="width: 50%; float: left;">

	<fieldset>
        <legend>Контактная информация</legend>
        <label for="full_name">ФИО</label> <input type="text" id="full_name" name="m[full_name]" value="{$Subscriber->full_name|escape}"/> <br />
		<label for="email">Адрес электронной почты</label><input type="text" id="email" name="m[email]" value="{$Subscriber->email|escape}"/> <br />
		<label for="filters">Группы</label>
        					<div id="selectedGroups" class="selectedList">
        						<span id="selectedGroupsList" style="font-style: italic;">
        							{foreach item=selectedGroup from=$selectedGroups name=groupsList}
        								{$selectedGroup->group_name}{if !$smarty.foreach.groupsList.last},{/if}
        							{foreachelse}
        								не обрано
        							{/foreach}
        							</span>&nbsp;<span>[<a href="javascript:void(0);" id="selectGroups">обрати</a>] *</span>
        					</div>
        					<input type="hidden" id="group_id" name="m[group_id]" value='{if $Subscriber->isNew()}"1"{else}{$Subscriber->group_id|stripslashes}{/if}'>
    </fieldset>
    <div class="buttonpanel">
        <input type="submit" name="save" value="Сохранить" class="button"  onclick="$('redirect').value = '';">
        <input type="submit" name="save_and_return" value="Сохранить и выйти" class="button" onclick="$('redirect').value = '1';">
    </div>
    <input type="hidden" name="id" id="id" value="{$Subscriber->getPk()}" />
    <input type="hidden" id="redirect" name="redirect" value="" />
</div>
<div style="clear: both;" />
</div>
</FORM>
{literal}
<script type="text/javascript">
<!--
$('selectGroups').observe('click', function () {
	window.getGroupsWindow().show($F('group_id'));	 
});
//-->
</script>
{/literal}